/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package models;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import play.data.validation.MaxSize;
import play.data.validation.Required;
import play.db.jpa.Model;

/**
 *
 * @author Jarjarbing
 */
@Entity
public class Vehicle extends Model {

    @Required
    public String VehicleID;
    @Required
    public MasLocation MasLoc;
    @Required
    @OneToMany(cascade = CascadeType.ALL)
    public List<MasLocation> CompanyID = new ArrayList();
    @MaxSize(10)
    public String PlateNo;
    public Date RegistrationDate;
    @MaxSize(10)
    public String Province;
    @MaxSize(10)
    public String InspectionCode;
    @MaxSize(10)
    public String FuelType;
    @MaxSize(10)
    public String VehicleType;
    @MaxSize(10)
    public String Characteristic;
    @MaxSize(10)
    public String VehicleBrand;
    @MaxSize(15)
    public String Model;
    @MaxSize(10)
    public String ModelYear;
    @MaxSize(10)
    public String Color;
    @MaxSize(30)
    public String ChassisNo;
    @MaxSize(10)
    public String ChassisNoPosition;
    @MaxSize(10)
    public String EngineBrand;
    @MaxSize(20)
    public String EngineNo;
    @MaxSize(10)
    public String EngineNoPosition;
    @MaxSize(10)
    public Integer NoOfCylinder;
    @MaxSize(10)
    public Integer Power;
    @MaxSize(10)
    public Integer NoOfShaft;
    @MaxSize(10)
    public Integer NoOfWheel;
    @MaxSize(10)
    public Integer NoOfTire;
    @MaxSize(10)
    public Integer VehicleWeight;
    @MaxSize(10)
    public Integer LoadedWeight;
    @MaxSize(10)
    public Integer GrossWeight;
    @MaxSize(10)
    public Integer NoOfPassengerSeat;
    @MaxSize(10)
    public Integer NoOfPassengerStand;
    @MaxSize(10)
    public String LicenseNo;
    public Date LicenseExpiredDate;
    @MaxSize(10)
    public String AcquisitionType;
    @MaxSize(50)
    public String Owner;
    @MaxSize(50)
    public String Address;
    public Date PayTaxDate;
    public Long TaxRate;
    public String InsuranceCompany1;
    public Date InsuranceFromDate1;
    public Date InsuranceToDate1;
    public String PolicyNo1;
    public String InsuranceCompany2;
    public Date InsuranceFromDate2;
    public Date InsuranceToDate2;
    public String PolicyNo2;

    public String toString() {
        return VehicleID;
    }
}
